<?php

class Restaurant extends MY_Model {
 
    function Restaurant()
    {
        // Call the Model constructor
        parent::MY_Model();

	$this->nombreTabla = "restaurant";
	$this->idT1= "idResto";
	$this->nombreCampo="nombre";


		$this->campos[] = array("realname" => "idCiudad",
					"clase" => "opciones",
					"label" => "Ciudad",
					"modelo" => "ciudad",
					"rules" => "required|integer");

		$this->campos[] = array("realname" => "idZona",
					"clase" => "opciones",
					"label" => "Zona",
					"modelo" => "Zona",
					"rules" => "required|integer");

		$this->campos[] = array("realname" => "nombre",
					"clase" => "text",
					"label" => "Nombre",
					"rules" => "required|min_length[3]|max_length[45]|alpha_numeric_space");
		
		$this->campos[] = array("realname" => "direccion",
					"clase" => "text",
					"label" => "Direccion",
					"rules" => "required|min_length[3]|max_length[100]|alpha_numeric_space");

		$this->campos[] = array("realname" => "telefono",
					"clase" => "text",
					"label" => "Telefono",
					"rules" => "required|numeric|min_length[5]|max_length[30]");

		$this->campos[] = array("realname" => "paginaWeb",
					"clase" => "text",
					"label" => "Web",
					"rules" => "required|min_length[3]|max_length[45]|alpha_numeric_space");
		
		$this->campos[] = array("realname" => "mail",
					"clase" => "text",
					"label" => "Mail",
					"rules" => "trim|required|valid_email");

		$this->campos[] = array("realname" => "tiempoResMax",
					"clase" => "date",
					"label" => "Tiempo max Reserva",
					"rules" => "required|min_length[3]|max_length[30]");

		$this->campos[] = array("realname" => "tiempoResMin",
					"clase" => "date",
					"label" => "Tiempo min Reserva",
					"rules" => "required|min_length[3]|max_length[30]");

		$this->campos[] = array("realname" => "tiempoReserva",
					"clase" => "time",
					"label" => "Tiempo Reserva(hh:mm:ss)",
					"rules" => "required|min_length[3]");
		
		// Nombre de los modelos que son hijos
		 $this->hijos = array('salon'=>'Salon');	
		

    }
     
}


?>
